'''
Created on Apr 4, 2012

@author: Vu Dao
'''
# xpath button create new lesson
def xpathOfCreateLesson():
    return "//a[text()='New lesson']"

# xpath text box lesson name
def xpathOfTxtLessonName():
    return "//input[@name='name']"

# xpath combobox language
def xpathOfComboLanguage():
    return "//select[@name='languages_NAME']"

# xpath Categories
def xpathOfCategories():
    return "//select[@name='directions_ID']"

# xpath radio button
def xpathOfRadioButton(index = 1):
    if index == 1:
        return "//label[text()='Exclusively through course']/../input"
    else:
        return "//label[text()='Directly']/../input']"
    
# xpath check box Active
def xpathOfActive():
#    return "//input[@name='active']"
    return "//input[@name='active' and @value='1']"

# xpath check box Show lesson in catalog
def xpathOfLessonCatalog():
    return "//input[@name='show_catalog']"

# xpath text box Price
def xpathTxtPrice():
    return "//input[@name='price']"

# xpath button submit
def xpathBtnSubmitLesson():
    return "//input[@name='submit_lesson']"

# xpath text box search lesson
def xpathTxtSearchLesson():
    return "//input[@name='search_text']"

#xpath Delete lesson button
def xpathDeleteLesson(lessonName):
    return "//a[contains(text(),'"+lessonName+"')]/../../td/img[@title='Delete']"

# link of lesson
def xpathLessonLink(lessonLink):
    return "//a[contains(text(),'"+lessonLink+"')]"